package com.xf.lastmall.moudle.enums;

/**
 * 
 * Description:退款状态
 *
 * date:2016年9月6日下午2:35:48
 *
 * @author SONGYANQUN
 * @version
 */
public enum RefundApplyStatus {
	/**
	 * 退款订单创建
	 */
	REFUNDS_ORDER_CREATE("0","创建"),
	/**
	 * 初审中
	 */
	REFUNDS_AUDIT_BEGIN("1","初审中"),
	/**
	 * 复审中
	 */
	REFUNDS_AUDIT_AGAIN("2","复审中"),
	/**
	 * 付款审核中
	 */
	REFUNDS_AUDIT_CASH("6","付款审核中"),
	/**
	 * 退款处理中
	 */
	REFUNDS_TREATMENT("3","退款处理中"),
	/**
	 * 退款成功
	 */
	REFUNDS_SUCCESS("4","退款成功"),
	/**
	 * 退款失败
	 */
	REFUNDS_FAIL("5","退款失败");
	
	private String value;

	private String text;

	RefundApplyStatus(String value, String text) {
		this.value = value;
		this.text = text;
	}

	public String getValue() {
		return this.value;
	}

	public String getText() {
		return this.text;
	}

	public static RefundApplyStatus fromValue(String value) {
		for (RefundApplyStatus action : RefundApplyStatus.values()) {
			if(action.getValue().equals(value)){
				return action;
			}
		}
		return null;
	}
	
	public static RefundApplyStatus fromText(String text) {
		for (RefundApplyStatus action : RefundApplyStatus.values()) {
			if(action.getText().equals(text)){
				return action;
			}
		}
		return null;
	}
}
